#ifndef TRANSFORMATION_H
#define TRANSFORMATION_H

#include "Vector.h"
#include <Vector>
#include <Math.h>
#include "Matrix4.h"

#define PI 3.14159265

class Transformation
{
public:
	static float sin2( float x )
	{
		return sin( x * PI/180.0 );
	}

	static float cos2( float x )
	{
		return cos( x * PI/180.0 );
	}

	static void Transformation::apply(const Matrix4& matrix, Vector& v );
	static void Transformation::apply(const Matrix4& matrix, std::vector<Vector>& list );

	static Matrix4 getRotationMatrix( const Vector& rotation );
	static Matrix4 getScaleMatrix( float scale );
	static Matrix4 getTranslationMatrix( const Vector& move );

	// Functies voor dummies
	static std::vector<Vector> scale( std::vector<Vector>& list, float scale )
	{
		std::vector<Vector> output = list;
		apply( getScaleMatrix(scale), output );

		return output;
	}

	static const Vector move( const Vector& org, const Vector& move )
	{
		Vector output = org;
		apply( getTranslationMatrix(move), output );

		return output;
	}

	static std::vector<Vector> rotate( std::vector<Vector>& list, float xDegrees, float yDegrees, float zDegrees )
	{
		std::vector<Vector> output = list;

		apply( getRotationMatrix(Vector(xDegrees, yDegrees, zDegrees)), output );
		
		return output;
	}
};

#endif